package cn.com.blueInfo.HaiYuan.business.purchase.controller;

import cn.com.blueInfo.HaiYuan.business.purchase.service.PurchaseBaseService;
import cn.com.blueInfo.utils.result.BootstrapTable;
import cn.com.blueInfo.utils.result.ResultInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * 采购单基本信息接口
 * @ClassName: PurchaseBaseController
 * @author suxch
 * @date 2020年11月7日  下午2:33:07
 */
@RestController
@RequestMapping("/operation/business/purchaseBase")
public class PurchaseBaseController {

    @Autowired
    private PurchaseBaseService purchaseBaseService;

    /**
     * 分页查询采购单基本信息
     * @Title: queryPurchaseBaseInfoByPage
     * @param request
     * @return BootstrapTable
     * @throws
     */
    @RequestMapping("/queryPurchaseBaseInfoByPage.do")
    public BootstrapTable queryPurchaseBaseInfoByPage(HttpServletRequest request) {
        return purchaseBaseService.queryPurchaseBaseDataByPage(request);
    }

    /**
     * 新增采购单基本信息
     * @Title: addPurchaseBaseInfo
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/addPurchaseBaseInfo.do")
    public ResultInfo addPurchaseBaseInfo(HttpServletRequest request) {
        return purchaseBaseService.insertPurchaseBaseData(request);
    }

    /**
     * 更新采购单基本信息
     * @Title: updatePurchaseBaseInfo
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/updatePurchaseBaseInfo.do")
    public ResultInfo updatePurchaseBaseInfo(HttpServletRequest request) {
        return purchaseBaseService.updatePurchaseBaseData(request);
    }

    /**
     * 删除采购单基本信息
     * @Title: deletePurchaseBaseInfo
     * @param request
     * @return ResultInfo
     * @throws
     */
    @RequestMapping("/deletePurchaseBaseInfo.do")
    public ResultInfo deletePurchaseBaseInfo(HttpServletRequest request) {
        return purchaseBaseService.deletePurchaseBaseData(request);
    }

}
